From: Florian Müllner Date: Fri, 15 Jul 2022 16:15:13 +0000 (+0200) Subject: status/volume: Small cleanup X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~244 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a768efad066b10509f0a36a4bccf55e56c614976;p=gnome-shell.git status/volume: Small cleanup There is no point in splitting out a function that has one caller and sets a single property. Part-of: --- diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index bbbfb454b..21aef0a6f 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -254,19 +254,16 @@ var OutputStreamSlider = class extends StreamSlider { return false; } - _updateSliderIcon() { + _portChanged() { + const hasHeadphones = this._findHeadphones(this._stream); + if (hasHeadphones === this._hasHeadphones) + return; + + this._hasHeadphones = hasHeadphones; this._icon.icon_name = this._hasHeadphones ? 'audio-headphones-symbolic' : 'audio-speakers-symbolic'; } - - _portChanged() { - let hasHeadphones = this._findHeadphones(this._stream); - if (hasHeadphones != this._hasHeadphones) { - this._hasHeadphones = hasHeadphones; - this._updateSliderIcon(); - } - } }; var InputStreamSlider = class extends StreamSlider {